package eleven.senven.hpb.ui;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import eleven.senven.hpb.R;

public class SecondDetail extends ActionBarActivity {
    private TextView tv;
    private ImageView back;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Intent intent = getIntent();
        String name = intent.getStringExtra("name");
        if(name.equals("本周热店")){
            setContentView(R.layout.activity_second_detail);
            tv = (TextView) findViewById(R.id.titles);
            back=(ImageView)findViewById(R.id.detail_hot_back);
        }else if(name.equals("达人排行榜")){
            setContentView(R.layout.daren_layout);
            tv = (TextView) findViewById(R.id.daren_titles);
            back=(ImageView)findViewById(R.id.detail_daren_back);
        }else{
            setContentView(R.layout.before_layout);
            tv=(TextView)findViewById(R.id.before_titles);
            back=(ImageView)findViewById(R.id.detail_before_back);
        }
        tv.setText(name);
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

    }


}
